# encoding: utf-8

ls = [
['指标', '2014年', '2015年', '2016年'],
['居民消费价格指数', '102', '101.4', '102'],
['食品', '103.1', '102.3', '104.6'],
['烟酒及用品', '994', '102.1', '101.5'],
['衣着', '102.4', '102.7', '101.4'],
['家庭设备用品', '101.2', '101', '100.5'],
['医疗保健和个人用品', '101.3', '102', '101.1'],
['交通和通信', '99.9', '98.3', '98.7'],
['娱乐教育文化', '101.9', '101.4', '101.6'],
['居住', '102', '100.7', '101.6'],
]

f = open('cpi.csv', 'w')
for row in ls:
    f.write(','.join(row) + '\n')

f.close()
